﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace yieldTest
{
    class Program
    {
        static IEnumerable<int> ma(int count)
        {
            for (int index = 0; index < count; index++)
            {
                yield return index;
            }
        }
        static void Main(string[] args)
        {
            foreach (var element in ma(100))
            {
                Console.WriteLine(element);
            }
        }
    }
}
